package handlers

import (
	"game-server/manager"
	"log"
	"pb/protocol"
)

func RegisterHandler() {
	// 注册消息处理器
	log.Println("注册消息处理器...")
	manager.GlobalRouter.AddHandler(protocol.C_S_FORMATION_INFO, HandlerFormationInfo)
	manager.GlobalRouter.AddHandler(protocol.C_S_ADJUST_FORMATION, HandlerFormationAdjust)
	manager.GlobalRouter.AddHandler(protocol.C_S_MATCH_REQ, HandlerMatch)
	manager.GlobalRouter.AddHandler(protocol.C_S_MATCH_CANCEL_REQ, HandlerCancelMatch)
	log.Println("消息处理器注册完成")
}
